import { createRouter, createWebHistory } from 'vue-router'
import RoomList from '../views/RoomList.vue'
import DefaultLayout from '../layouts/DefaultLayout.vue'
import BookingList from '../views/BookingList.vue'

const router = createRouter({
  history: createWebHistory(import.meta.env.BASE_URL),
  routes: [
    {
      path: '/',
      name: 'layout',
      component: DefaultLayout,
      children: [
        {
          path: '',
          name: 'roomList',
          component: RoomList
        },
        {
          path: 'booking',
          name: 'bookingList',
          component: BookingList
        }
      ]
    }
  ]
})

export default router
